<template>
  <div class="redirect-contianer"></div>
</template>

<script setup>
import { onBeforeMount } from "vue";
import { useRoute, useRouter } from "vue-router";

const route = useRoute();
const router = useRouter();
onBeforeMount(() => {
  const { params, query } = route;
  const { path } = params;
  router.replace({
    path: "/" + (typeof path === "string" ? path : path.join("/")),
    query,
  });
});
</script>
